import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

// 查询参数列表
export function listTermAttendanceGroup(query) {
  return request({
    url: '/workJobApi/termAttendanceGroup/listTermAttendanceGroup',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getTermAttendanceGroup(id) {
  return request({
    url: '/workJobApi/termAttendanceGroup/' + praseStrEmpty(id),
    method: 'get'
  })
}

// 新增考勤组
export function add(data) {
  return request({
    url: '/workJobApi/termAttendanceGroup/add',
    method: 'post',
    data: data
  })
}

// 修改考勤组
export function update(data) {
  return request({
    url: '/workJobApi/termAttendanceGroup/',
    method: 'put',
    data: data
  })
}


// 修改考勤组状态
export function modifTermAttendanceGroupStatus(data) {
  return request({
    url: '/workJobApi/termAttendanceGroup/modifTermAttendanceGroupStatus',
    method: 'post',
    data: data
  })
}

// 删除考勤组
export function delTermAttendanceGroup(id) {
  return request({
    url: '/workJobApi/termAttendanceGroup/' + id,
    method: 'delete'
  })
}


// 查询参数列表
export function listTimeShiftList(params) {
  return request({
    url: '/workJobApi/termAttendanceGroup/listTimeShiftList',
    method: 'get',
    params
  })
}

// 新增考勤规则
export function addTermAttendanceRules(data) {
  return request({
    url: '/workJobApi/termAttendanceGroup/addTermAttendanceRules',
    method: 'post',
    data: data
  })
}

// 查询考勤规则
export function getTermAttendanceRules() {
  return request({
    url: '/workJobApi/termAttendanceGroup/getTermAttendanceRules' ,
    method: 'get'
  })
}
